﻿-- =============================================
-- Author:		Dmitry Nazarov
-- Create date: 22.03,2011
-- Description:	
-- =============================================
CREATE FUNCTION [dbo].f_get_currency_name_by_id 
(
	@p_currency_id int
)
RETURNS char(3)
AS
BEGIN
	-- Declare the return variable here
	DECLARE @p_currency_name char(3)

	SELECT @p_currency_name = SHORT_NAME FROM NSI_CURRENCY
	WHERE ID = @p_currency_id

	-- Return the result of the function
	RETURN @p_currency_name

END